Skip to content

Make seq concatenation operate on sequence tuples#162

Open
coord-e wants to merge 2 commits into
mainfrom
claude/seq-concat-tuple
Open

Make seq concatenation operate on sequence tuples#162
coord-e wants to merge 2 commits into
mainfrom
claude/seq-concat-tuple

Conversation

@coord-e

@coord-e coord-e commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Summary

PR 2 of 4 restructuring #153. Now that #161 is merged, this is based directly on main.

Rename ArrayConcat / ArrayConcatTerm to SeqConcat / SeqConcatTerm and the SMT concat_int_array definition to seq_concat, and have them carry the two sequences as whole (array, length) tuples (seq1 / seq2) rather than four destructured array/length terms. The seq_concat definition now takes two tuple parameters and projects their fields internally instead of accepting the array and length as separate parameters. The select peephole projects the tuple fields accordingly.

Details

  • The (array, length) tuple datatype is now always declared for every int-array element sort a seq_concat definition is emitted for, so the definition type-checks even when no sequence value of that element sort otherwise appears in the system.

Validation

  • cargo build, cargo fmt --all -- --check, cargo clippy -- -D warnings
  • cargo test — Spacer-backed tests pass.
  • The rewritten define-fun-rec was dumped via THRUST_OUTPUT_DIR and checked directly with z3: it emits as seq_concat<…>, parses, and on a ground instance evaluates the concatenation exactly as before. (PCSat-backed tests require the CoAR Docker image and were not run here.)

Stack

  1. named fields (Give the Seq model named array and length fields #161, merged)
  2. this PR — seq concatenation on sequence tuples
  3. offset field (Add an offset field to the Seq model #163)
  4. subsequence + split_first/split_last(_mut) (Add subsequence and slice split operations #164)

🤖 Generated with Claude Code

https://claude.ai/code/session_01GzapTuen2mKHkkN3B7d8qi

@coord-e coord-e force-pushed the claude/seq-named-fields branch from 84a3441 to 8b876de Compare July 2, 2026 01:21
@coord-e coord-e force-pushed the claude/seq-concat-tuple branch from 8b1d9a7 to e14038b Compare July 2, 2026 01:22
@coord-e coord-e force-pushed the claude/seq-named-fields branch 2 times, most recently from c720ea2 to ecd5d85 Compare July 2, 2026 05:45
Base automatically changed from claude/seq-named-fields to main July 2, 2026 06:00
Rename `ArrayConcat`/`ArrayConcatTerm` to `SeqConcat`/`SeqConcatTerm` and
the SMT `concat_int_array` definition to `seq_concat`, and have them carry
the two sequences as whole `(array, length)` tuples (`seq1`/`seq2`) rather
than four destructured array/length terms. The `seq_concat` definition now
takes two tuple parameters and projects their fields internally instead of
accepting the array and length as separate parameters, and the select
peephole projects the tuple fields accordingly.

The `(array, length)` tuple datatype is now always declared for every
int-array element sort a `seq_concat` definition is emitted for, so the
definition type-checks even when no sequence value of that element sort
otherwise appears in the system.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GzapTuen2mKHkkN3B7d8qi
@coord-e coord-e force-pushed the claude/seq-concat-tuple branch from e14038b to ee5d0b2 Compare July 2, 2026 06:42
@coord-e coord-e changed the title Make concat_int_array operate on sequence tuples Make seq concatenation operate on sequence tuples Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants